package com.bootdo.system.controller;

import com.bootdo.common.utils.R;
import com.bootdo.system.service.UpLoadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;


/**
 * @Author: 况鑫威
 * @Date: 2021/4/18
 * @Time: 14:33
 */

@RestController
public class UpLoadController {

    @Autowired
    private UpLoadService upLoadService;
    /**
     * 功能描述:上传文件
     * @Param: [file,type]
     * @Return: com.ncxhr.logic.vo.ResultInfo
     * @Author: 况鑫威
     * @Date: 2021/4/17
     * @Time:
     * 1图像， 2文件
     * 相册 = "1";
     * 附件简历 = "2";
     * 身份证正面 = "3";
     * 头像 = "4";
     * 身份证反面= "5";
     * 手持身份证 = "6";
     * 营业执照 = "7";
     * 公司log = "8";
     */
    @PostMapping("/upload")
    public R upload(MultipartFile file, String type) {
        return upLoadService.upLoad(file, type);
    }
}
